#include"SelectServer.hpp"
#include"Logger.hpp"
#include<string>
#include<memory>

void Usage(const std::string& proc)
{
    std::cerr << "Usage: " << proc << " serverport";
}

int main(int argc , char* argv[])
{
    if(argc !=2 )
    {
        Usage(argv[0]);
        return 0;
    }
    EnableConsoleLogStrategy();

    uint16_t port = std::stoi(argv[1]);
    std::unique_ptr<SelectServer> selectsvr = std::make_unique<SelectServer>(port);
    selectsvr->Run();
    
    return 0;
}